<template>
    <view class="content">
        <gz-image-rotate ref="gzImageRotate" @success="success"></gz-image-rotate>
        <button @click="fDrawImage">选择图片</button>
		
		<image class="img2" :src="img"></image>
    </view>
</template>
<script>
	import gzImageRotate from '@/components/gz-image-rotate/gz-image-rotate.vue'
	export default {
            components:{
                gzImageRotate
            },
            data() {
                return {
                    title: 'Hello',
					img: "",
                }
            },
            onLoad() {
    
            },
            methods: {
                success(e){
                    console.log('e.tempFilePath', e.tempFilePath);
					this.img = e.tempFilePath;
                    // uni.saveImageToPhotosAlbum({
                    //  filePath:e.tempFilePath
                    // })
                },
                fDrawImage() {
                    uni.chooseImage({
                        success: (res) => {
                            res.tempFilePaths[0],
                            this.$refs.gzImageRotate.start(res.tempFilePaths[0], 3)
                        }
                    })
                },
            }
        }
</script>

  